$(function(){
	
	var id = $.site.request.QueryString("id") ;
	if(undefined != id && "" != id) {
		productTypeList(id) ;
	}
	
	
	$("#pageContext").empty();
	$("#pageDiv").empty();
});

//关于我们
function productTypeList(id) {
	var sub_left_sider = $("#sub_left_sider") ;
	sub_left_sider.empty();
	
	$.post($.site.ctx.baseUrl + "/front/site/aboutTypeList.do?pid="+id, function(result){
		
		if(result[0].children) {
			sub_left_sider.empty() ;
			$.each(result[0].children, function(i, p){
				sub_left_sider.append("<li><a href='javascript:productList(\""+p.id+"\")'>"+p.colName+"</a></li>") ;
			}); 
			
			productList(result[0].children[0].id);
		}
	}, "JSON") ;
}

function productList(pid, curPage) {
	curPage = (curPage?curPage:1) ;
	var pageSize = 2 ;
	var pageNum = 0
	
	var pageContextList = $("#pageContext") ; pageContextList.empty();
	var pageDiv = $("#pageDiv") ; pageDiv.empty();
	
	$.post($.site.ctx.baseUrl + "/front/site/aboutContent.do?", {
		"pid": pid,
		"isPush": 1,
		"pageSize": pageSize,
		"curPage": curPage
	}, function(result){
		if(result.created) {
			
			var s = "<div class='others'>"+
		            	"<h1>"+result.pageTitle+"</h1>"+
		            	"<div class='space-side'>"+ (result.centent==undefined?"":result.centent) +"</div>"+
					"</div>";
			
			$("#pjax-container").html(s);
			
		} else {
			alert("找不到数据！") ;
		}
		
	}, "JSON") ;
}



















 